class App extends React.Component {
    state = {
        contentList: [],// 保存微博列表
        pageSum: 1,
        pageNo: 1
    }
    async getWeibo(pageNo=1, pageSize=10) {
        const result = await this.$axios.get("http://localhost:8081/weibo", {
            params: {
                pageNo,
                pageSize
            }
        })
        this.setState({
            contentList: result.contentList,
            pageNo: result.pageNo,
            pageSum: result.pageSum
        })
    }
    componentDidMount() {
        this.getWeibo();
    }

    render() {
        return (
            <>
                <TakeComment getWeibo={this.getWeibo.bind(this)}></TakeComment>
                <CommentOn getWeibo={this.getWeibo.bind(this)} {...this.state}></CommentOn>
            </>
        )
    }
}